<template>
  <div>
    <el-button v-show="$store.state.user.buttons.indexOf('btn.Add1')!=-1" type="primary">添加按钮1</el-button>
    <el-button v-show="$store.state.user.buttons.indexOf('btn.Add2')!=-1" type="primary">添加按钮2</el-button>
    <el-checkbox-group v-model="checkList" @change="onChange">
      <el-checkbox label="复选框A" />
      <el-checkbox label="复选框B" />
      <el-checkbox label="复选框C" />
      <el-checkbox label="复选框D" />
      <el-checkbox label="复选框E" />
      <el-checkbox label="复选框F" />
      <el-checkbox label="复选框F" />
      <el-checkbox label="复选框F" />
      <el-checkbox label="复选框E" />
      <el-checkbox label="复选框E" />
      <el-checkbox label="复选框FF" />
      <el-checkbox label="复选框c" />
      ddgh
      1212
      1233
      13231231231
    </el-checkbox-group>
  </div>
</template>

<script>
import { type } from '@/utils/type'

export default {
  name: '',
  data() {
    return {
      form: [

      ],
      prop: '',
      checkList: []

    }
  },
  methods: {
    onChange() {
      this.form = []
      this.checkList.forEach((item) => {
        this.prop = type(item)
        this.form.push({ label: item, prop: this.prop })
      })
      this.form.unshift({ label: '信息', prop: 'info' })
      this.form.push({ label: '操作', prop: 'OP' })
      console.log(JSON.stringify(this.form))
      // console.log(this.checkList)
    }
  }
}
</script>

<style scoped>

</style>
